﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;

namespace SourcePacker
{
    [Serializable]
    class Settings
    {
        public Settings()
        {
            ExportHeaderFiles = new string[] { };
            SourceFolders = new string[] { };
            CondionalSourceFolders = new Dictionary<string, KeyValuePair<string, string>>();
            AdditionalIncludeFolders = new string[] { };

            SourceExtensions = new string[] { ".c", ".cpp" };

            OutputHeaderFile = "";
            OutputSourceFile = "";

            ReplaceSystemInclude = true;
            IncludeExportHeaderIfNeeded = true;
            AppendFileSplitter = false;
            CompactSource = true;
        }

        /// <summary>
        /// 导出包含文件
        /// </summary>
        public string[] ExportHeaderFiles { get; set; }

        /// <summary>
        /// 源码目录
        /// </summary>
        public string[] SourceFolders { get; set; }

        /// <summary>
        /// 条件源码目录
        /// </summary>
        public Dictionary<string, KeyValuePair<string, string>> CondionalSourceFolders { get; set; }

        /// <summary>
        /// 附加的包含目录
        /// </summary>
        public string[] AdditionalIncludeFolders { get; set; }

        /// <summary>
        /// 源代码扩展名
        /// </summary>
        public string[] SourceExtensions { get; set; }

        /// <summary>
        /// 输出头文件
        /// </summary>
        public string OutputHeaderFile { get; set; }

        /// <summary>
        /// 输出源文件
        /// </summary>
        public string OutputSourceFile { get; set; }

        /// <summary>
        /// 替换系统包含文件（尖括号）
        /// </summary>
        public bool ReplaceSystemInclude { get; set; }

        /// <summary>
        /// 如果需要，自动包含导出头文件
        /// </summary>
        public bool IncludeExportHeaderIfNeeded { get; set; }

        /// <summary>
        /// 是否添加文件间隔符
        /// </summary>
        public bool AppendFileSplitter { get; set; }

        /// <summary>
        /// 是否压缩源代码
        /// </summary>
        public bool CompactSource { get; set; }
    }
}
